package com.treasure.service.result;

import com.treasure.service.enums.CodeEnum;

/** 
* @ClassName    : ResponseResult 
* @author       : panxingwu 
* @date         : 2018年5月30日 下午8:39:23 
* @Description  : 响应参数
*/
public class ResponseResult {
	private String code;
	private String message;
	private Object data;
	
	public ResponseResult() {
		setCodeEnum(CodeEnum.SUCCESS);
	}
	public void setCodeEnum(CodeEnum codeEnum) {
		this.code = codeEnum.getCode();
		this.message = codeEnum.getDesc();
	}
	public ResponseResult(CodeEnum codeEnum) {
		this.code = codeEnum.getCode();
		this.message = codeEnum.getDesc();
	}
	public ResponseResult(CodeEnum codeEnum,Object data) {
		this.code = codeEnum.getCode();
		this.message = codeEnum.getDesc();
		this.data = data;
	}
	public ResponseResult(CodeEnum codeEnum,String message,Object data) {
		this.code = codeEnum.getCode();
		this.message = message;
		this.data = data;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
}
